Oftentimes, computer programs allocate and deallocate (e.g., reserve and release) memory dynamically during execution. However, if the program has a bug, the memory management may cause problems related to inappropriate use of memory, such as the use of memory that does not belong to the computer program, or trying to access memory that has been deallocated.
Memory-corruption errors may be classified into two categories: performance errors and correctness errors. Performance errors are errors that lower the expected performance of a computer program, although the program may still operate correctly, just slower. Correctness errors are errors where the program is behaving incorrectly, such as by inappropriately accessing memory.